<?php require VIEW_PATH."/header.php";?>
<body>
	<form method="post">
    <input type="hidden" name="shop_type_id" value="<?php echo $field['shop_type_id']?>">
    <input type="hidden" name="attr_id" value="<?php echo $field['attr_id']?>">
<table class="hd-table hd-table-form hd-form">
    <thead>
    <tr>
        <td colspan="2">修改属性</td>
    </tr>
    </thead>
    <tbody>
   
    <tr>
        <th>属性名称</th>
        <td>
            <input type="text" name="attr_name" value="<?php echo $field['attr_name']?>">
        </td>
    </tr>
    
    <tr>
        <th>属性类型</th>
        <td>
        <label>
            <input type="radio" name="attr_type" value="1"
            <?php if($field['attr_type']==1){?>
                checked
               <?php }?>
            >属性</label>
        <label>
            <input type="radio" name="attr_type" value="2"
            <?php if($field['attr_type']==2){?>
                checked
               <?php }?>
            > 规格 </label>
            <span class="hd-validate-notice">
选择规格时必须选择“下拉列表”显示类型
            </span>
        </td>
    </tr>
    <tr>
        <th>表单类型</th>
        <td>
        <label>
            <input type="radio" name="show_type" value="1"
            <?php if($field['show_type']==1){?>
                checked
               <?php }?>
            >文本框</label>
        <label>
            <input type="radio" name="show_type" value="2"
            <?php if($field['show_type']==2){?>
                checked
               <?php }?>
            >下拉列表框 </label>
            <br/>
             <span class="hd-validate-notice">
                单选框、复选框、下拉列表框时必须输入属性值，每行一个值
             </span>
        </td>
    </tr>
    <tr>
        <th>属性值</th>
        <td>
        <?php if($field['show_type']==1){?>
                
       <textarea name="attr_values" class="hd-w300 hd-h100" disabled><?php echo $field['attr_values']?></textarea>
       <?php }else{?>
<textarea name="attr_values" class="hd-w300 hd-h100"><?php echo $field['attr_values']?></textarea>
       
               <?php }?>
        </td>
    </tr>
    <tr>
        <td colspan="2">
        <button class="hd-btn hd-btn-primary">提交</button>
        <a href="<?php echo __HISTORY__?>" class="hd-btn hd-btn-primary">返回</a>
        </td>
    </tr>
    </tbody>
</table>
</form>
<script src="App/Admin/View/ShopAttr/js.js"></script>
</body>
</html>